package com.atguigu.gmall.product.controller;

import com.atguigu.gmall.common.result.Result;
import com.atguigu.gmall.product.service.TestService;
import io.swagger.annotations.Api;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @Auther 赵乾坤
 * @Date 2020-12-25 11:16
 */
@Api(tags = "测试缓存接口")
@RestController
@RequestMapping("admin/product/test")
public class TestController {

    @Autowired
    private TestService testService;
    //测试上锁的功能
    @GetMapping("/testLock")
    public Result testLock(){
//        testService.incr();
        testService.incr123();
        return Result.ok();
    }

}
